@import "../css/var";
@import "../css/mixin";

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
}

input[type="number"] {
  -moz-appearance: textfield;
}

.input-wrapper {
  display: inline-block;
  position: relative;
}

.input {
  font-family: "Microsoft Yahei", serif;
  box-sizing: border-box;
  border: $border;
  outline: 0;
  transition: all 0.2s;
  border-radius: 0.05rem;
  padding: 0 0.1rem;
  width: 100%;
  -webkit-appearance: none;
  font-size: 0.14rem;

  &:disabled {
    background: #eee;
  }
}

.round {
  border-radius: 0.35rem;
}

.textarea {
  padding: 0.05rem 0.1rem;
  resize: none;
}

.normal {
  height: 0.35rem;
}

.small {
  height: 0.3rem;
}

.mini {
  height: 0.25rem;
}

.input:focus {
  border-color: $primary;
}

.input.red:focus {
  border-color: $red;
}

.input.green:focus {
  border-color: $green;
}

.input.blue:focus {
  border-color: $blue;
}

.input.orange:focus {
  border-color: $orange;
}

.prefix, .suffix {
  @include middle;
  display: flex;
  align-items: center;
  padding: 0 0.08rem;
}

.prefix {
  left: 0;
}

.suffix {
  right: 0;
}

.clear-btn {
  color: $gray;
  font-size: 0.1rem;
}

.clear-btn:active {
  opacity: 0.7;
}
